package fr.pascal.polymorphisme;

public class Main {
	public static void main(String[] args) {
		
		Animal animal = new Animal("kiki", 11);
		System.out.println(animal);
		System.out.println();
		
		Animal chat = new Chat("La fouine", 12, "tigrée");
		System.out.println(chat);
		System.out.println();
		
		Animal cheval = new Cheval("Tornado", 25, "noire");
		System.out.println(cheval);
		System.out.println();
		
		animal = chat;
		animal = cheval;
		
//		chat = (Chat) animal;
//		cheval = (Cheval) animal;

		
		//		chat = (Chat) cheval;
		
//		chat = (Famille) animal;
//		chat = cheval;
//		cheval = chat;
//		cheval = (Cheval) chat;
		
		System.out.println(chat);
		System.out.println(cheval);
	}
}
